package com.mocha.mybatis.utils;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mocha.common.core.MochaPage;

/**
 * @author: songkui
 * @date: 2022/6/21 18:04
 */
public class PageHandler {

    public static <T> MochaPage<T> buildMochaPage(Page<T> page){
        return MochaPage.of(page.getRecords(), page.getTotal(),  page.getSize(),  page.getCurrent());
    }

}
